package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IBookMarkDao;
import org.jsbd.boss.domian.BookMark;

public class BookMarkDaoImpl extends CrackBaseDao implements IBookMarkDao {

	@Override
	public void save(BookMark bookMark) {
		super.insert("qy_book_mark.insert_book_mark", bookMark);
	}

	@Override
	public void save(List<BookMark> list) {
		super.batchInsert("qy_book_mark.insert_book_mark", list);
	}

	@Override
	public int update(BookMark bookMark) {
		return super.update("qy_book_mark.update_book_mark", bookMark);
	}

	@Override
	public BookMark get(BookMark bookMark) {
		return (BookMark) super.queryForObject("qy_book_mark.select_book_mark_one", bookMark);
	}

	@Override
	public BookMark getById(Integer id) {
		return (BookMark) super.queryForObject("qy_book_mark.select_by_id", id);
	}
	

	@SuppressWarnings("unchecked")
	@Override
	public List<BookMark> getList(BookMark bookMark) {
		return super.queryForList("qy_book_mark.select_book_mark_list", bookMark);
	}

	@Override
	public Integer getListPageCount(BookMark bookMark) {
		return super.queryForCount("qy_book_mark.select_book_mark_page_count", bookMark);
	}
	
	@Override
	public void delete(List<Integer> ids) {
		super.batchUpdate("qy_book_mark.delete_book_mark", ids);
	}

	@Override
	public String getApkNameByMark(String mark) {
		return (String) super.queryForObject("qy_book_mark.select_apk_name_by_mark", mark);
	}
	
}
